<?PHP
/*
if(!$userID) //This session stuff may have already been done once on the parent page.
{
	//set session save path
	session_save_path('/var/www/vhosts/joshhughes.com/private/sessions');
	// Initialize a session. 
	session_start();
	$count++;
	$sessionId = session_id();
//}
*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Login</title>
<!-- Scripts -->
<script src="http://hockey.joshhughes.com/login/xml_http_request.js" type="text/javascript">
// xml http request script modified slightly from that found at
// <http://www.webpasties.com/xmlHttpRequest/index.html>, which is
// Copyright 2005 Bill Bercik.
</script>
<script src="http://hockey.joshhughes.com/login/php.js" type="text/javascript"></script>
<script src="http://hockey.joshhughes.com/login/sha1.js" type="text/javascript"></script>
<script src="http://hockey.joshhughes.com/login/login_controller.js" type="text/javascript"></script>
<script src="http://hockey.joshhughes.com/login/login_presentation.js" type="text/javascript"></script>
<script src="http://hockey.joshhughes.com/scripts/prototype.js" type="text/javascript"></script>
<script src="http://hockey.joshhughes.com/scripts/scriptaculous.js" type="text/javascript"></script>
<!-- Styles -->
<link rel="stylesheet" href="http://hockey.joshhughes.com/login/login.css" type="text/css" />
<?	if($League)
		echo "<link rel=\"stylesheet\" href=\"http://hockey.joshhughes.com/css/".$League.".css\" type=\"text/css\">\n";
	else
		echo "<link rel=\"stylesheet\" href=\"http://hockey.joshhughes.com/css/hockey.css\" type=\"text/css\">\n";
?>
</head>
<body>
<?
echo "sessionId = $sessionId<br/>";
echo "UserID = $userID";
?>
<div class="bluebg" style="padding: 5px; width: 165px;" >
	<div style="padding: 5px; background-color: #fff;">
		<div id="post_comment" <? if($userID) { echo "style=\"display:none;\"";}?>>
			<form action="post" onSubmit="return false">
				<div id="login" class="login">
					<div id="loginFields">
						<label for="username">Username: </label>
						<input type="text" name="username" id="username" size="17">
						
						<label for="password">Password: </label>
						<input type="password" name="password" id="password" size="17">
						
						<input type="submit" name="submit" value="Log In" />
					</div>
					<p id="message">Enter your username and password to log in.</p>
				</div>
			</form>
			<p id="forgotLink" style="display:none;" ><a href="#" class="permLink" onclick="new Effect.toggle('forgot', 'blind');" style="font-size: xx-small;">Forgot Password?</a></p>
			<div id="forgot" style="display:none;" >
				<form action="<?= $PHP_SELF; ?>" method="post">
					<table bgcolor="#FFFFFF">
						<tr>
							<td>
								<p>Please enter the Email address you registered with:</p>
							</td>
						<tr>
						<tr>
							<td>
								<input type="text" size="17" name="q" value=""/>
							</td>
						<tr>
						<tr>
							<td>
								<input type="Submit" value="Recover" />
							</td>
						<tr>
					</table>
				</form>
			</div>
			<div id="menuArea" <? if(!$userID) { echo "style=\"display:none;\"";}?>> <!--  style="display:none;" -->
				<b>Preferences:</b>
				<div class="VertMenu">
					<ul>
					<li><a href="http://hockey.joshhughes.com/site-wide/editprofile.php?League=<?=$League;?>" title="Edit profile settings, username & more.">Edit Profile</a></li>
					<li><a href="http://hockey.joshhughes.com/site-wide/invite.php?League=<?=$League;?>" title="Invite a Friend to join the pool!">Invite Friends</a></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
</html>
